<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>具名插槽</title>
</head>
<body>
<div id="app"></div>
<script type="text/javascript" src="../node_modules/vue/dist/vue.min.js"></script>
<script type="text/javascript">
    Vue.component('myLi', {
        template: '<li> ' +
        '预留的第一个坑' +
        '<slot name="one"></slot>' +
        '预留的第二坑' +
        '<slot name="two"></slot>' +
        '</li>'
    })
    var App = {
        template: '<div> <ul><myLi><h2 slot="one">我是第一个坑</h2><h3 slot="two">我是第二个坑</h3></myLi></ul> </div> '
    }


    new Vue({
        el: "#app",
        components: {
            App
        },
        template: '<App/>'
    })

</script>
</body>
</html>